import collections
Str=''
#分割句子
a=Str.split('.')
print(a)


#统计单词出现个数

souce = Str.replace('.','').replace(',','')
print(collections.Counter(souce))

words_dic = {}

for k in souce:
    if k in words_dic:
        words_dic[k] += 1

    else:
        words_dic[k] = 1

print(words_dic)

